﻿@model List<HxBlogs.WebApp.Models.BlogViewModel>
    @{ 
        string avatar = WebHelper.GetAvatarUrl();
    }
<div class="blog-list d-flex flex-column justify-content-start">
    @foreach (HxBlogs.WebApp.Models.BlogViewModel blog in Model)
    {
        <div class="blog-item  mb-2 bg-white " data-id="@blog.HexId" data-scroll-reveal="enter bottom over 1s">
            <div class="blog-item-content">
                <div class="blog-item-title">
                    <h4>
                        <a target="_blank" href="@(WebHelper.GetFullUrl("/article/"+blog.UserName+"/"+blog.HexId))">@blog.Title</a>
                    </h4>
                </div>
            </div>
            <div class="blog-item-summary blog-content-nowrap">
                <p>
                    @WebHelper.FilterHtmlP(blog.ContentHtml, 100)
                </p>
            </div>
            <div class="blog-item-user d-flex justify-content-start align-items-center">
                <div class="hx-avatar _32x32  hx-circle mr-2">
                    <a>
                        <img src="@avatar" />
                    </a>
                </div>
                <div class="mr-1">@(UserContext.GetDisplayName(blog.User))</div>
                <div class="mr-1">@(WebHelper.GetDispayDate(blog.PublishDate))</div>
                <div class="blog-read ml-auto">
                    <a>
                        <span class="hx-text-gray">阅读</span>
                        <span class="hx-text-blue">@blog.ReadCount</span>
                    </a>
                </div>
                <div class="blog-comment ml-2">
                    <a>
                        <span class="hx-text-gray">评论</span>
                        <span class="hx-text-blue">@blog.CmtCount</span>
                    </a>
                </div>
            </div>
        </div>
    }

</div>





